﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Bot.Application.Dto;
using Bot.Application.Services;
using Microsoft.AspNetCore.Mvc;

namespace Bot.WebAPI.Controllers
{
    [Route("api/v3/chatbot")]
    [ApiController]
    public class PrebuiltEntitiesController : ControllerBase
    {

        private readonly IPrebuiltEntityAppService _app;
        public PrebuiltEntitiesController(IPrebuiltEntityAppService app)
        {
            this._app = app;
        }

        [HttpGet]
        [Route("bots/{botId:Guid}/prebuiltEntities")]
        public ActionResult<IEnumerable<PrebuiltEntityDto>> GetList([FromRoute]Guid botId)
        {
            IEnumerable<PrebuiltEntityDto> list = _app.GetList(botId);
            return Ok(list);
        }
    }
}
